<!DOCTYPE html>
<html lang="en">
{include file="public/head" /}
<link href="__ADMIN__/vendors/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<!-- bootstrap-daterangepicker -->
<link href="__ADMIN__/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <!-- menu -->
        {include file="public/menu" /}
        <!-- menu -->
        <!-- top navigation -->
        {include file="public/top" /}
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3>订单管理</h3>
              </div>
            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <!--content-->
                <div class="x_panel">
                  <div class="x_title">
                    <h2>查看订单 <small>list order</small></h2>

                    <ul class="nav navbar-right panel_toolbox">
                      <li class="col-sm-3 col-sm-offset-1 col-xs-12">
                          <div class="input-group">
                              <input type="text" required="required" placeholder="请输入订单编号" class="form-control col-md-4 col-xs-6 order_num">
                              <span class="input-group-btn">
                            <button type="button" class="btn btn-success order_search_button">查找</button>
                          </span>
                          </div>
                      </li>

                      <li>
                        <div class="btn-group">
                            {UntilTag:orderstatus class="order-select"/}
                        </div>
                        <label></label>
                      </li>

                      <li>
                        <div id="reportrange_right" class="pull-left" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc">
                          <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
                          <span>{$time.startTime} - {$time.endTime}</span> <b class="caret"></b>
                        </div>
                      </li>

                      <li>
                        <button type="button" class="btn btn-success condition_destroy">重置条件</button>
                      </li>

                    </ul>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br>
                        <div class="table-responsive">
                          <table data-toggle="table" class="table">
                              <thead>
                                  <tr>
                                      <th>ID</th>
                                      <th>订单编号</th>
                                      <th>商品id</th>
                                      <th>商品图片</th>
                                      <th>商品淘宝id</th>
                                      <th>商品名称</th>
                                      <th>商品sku</th>
                                      <th>价格</th>
                                      <th>用户名</th>
                                      <th>联系名称</th>
                                      <th>电话</th>
                                      <th>收货地址</th>
                                      <th>留言</th>
                                      <th>下单时间</th>
                                      <th>状态</th>
                                      <th>操作</th>
                                  </tr>
                              </thead>
                              <tbody>
                                  {volist name="list" id="vo"}
                                  <tr>
                                      <td>{$vo.id}</td>
                                      <td><span>{$vo.order_num}</span></td>
                                      <td><span>{$vo.item_id}</span></td>
                                      <td><a href="{$vo.item.item_url}" target="_blank"><img src="{$vo.item.pic_url}" alt="{$vo.item.title}" class="img-rounded"
                                                                                        style="width: 120px;height: 120px;"></a></td>
                                      <td><span>{$vo.goods_id}</span></td>
                                      <td><span>{$vo.item_name}</span></td>
                                      <td><span>{$vo.sku_name}</span></td>
                                      <td><span>{$vo.money}</span></td>
                                      <td><span>{$vo.user.nickname}</span></td>
                                      <td><span>{$vo.username}</span></td>
                                      <td><span>{$vo.phone}</span></td>
                                      <td><span>{$vo.address}</span></td>
                                      <td><span>{$vo.remark}</span></td>
                                      <td><span>{$vo.create_time}</span></td>
                                      <td>
                                          {UntilTag:orderstatus id="vo.id" status="vo.status"/}
                                      </td>
                                      <td>
                                          <!--<button class="btn btn-success" onclick="window.location.href='{:url('admin/Order/edit','id='.$vo.id)}'">编辑</button>-->
                                          <!--&lt;!&ndash;<button class="btn btn-danger" onclick="order_del({$vo.id})">删除</button>&ndash;&gt;-->
                                      </td>
                                  </tr>
                                  {/volist}
                              </tbody>
                          </table>
                      </div>
                      <div class="panel">
                          <!--分页-->
                          <div class="text-center">
                              <ul class="pagination">
                                  {$list->render()}
                              </ul>
                          </div>
                          <!--分页-->
                      </div>

                  </div>
                </div>
                <!--content-->
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->
        <!-- footer content -->
        {include file="public/footer" /}
        <!-- /footer content -->
      </div>
    </div>
    <!-- script -->
    <!-- jQuery -->
    <script src="__ADMIN__/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="__ADMIN__/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="__ADMIN__/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="__ADMIN__/vendors/nprogress/nprogress.js"></script>
    <!-- script -->
    <script src="__ADMIN__/vendors/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="__ADMIN__/vendors/layer/layer.min.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="__ADMIN__/vendors/moment/min/moment.min.js"></script>
    <script src="__ADMIN__/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="__ADMIN__/build/js/app.js"></script>
    <script src="__ADMIN__/build/js/custom.js"></script>
    <script type="text/javascript">
        var order_del_url = "{:url('admin/Order/del')}";
        var order_editstatus_url = "{:url('admin/Order/editStatus')}";
        var startTime;
        var endTime;
        var mode = 'list';

        var status;

        $(function(){
            status = getUrlArg('status');
            if (status == '')
                status = 'all';
            var order_select = $('.order-select').find("option[value="+status+"]").attr("selected",true);
        });
    </script>

  </body>

</html>
